#include <iostream>
using namespace std;
//如果在函数的声明中给了缺省函数的话我们就没必要再定义中再给缺省函数了 
void Func1(int a = 10, int b = 20, int c = 30);
void Func2(int a, int b = 10, int c = 20);
int main()
{
    Func1();//可以一个都不传，全用的就是缺省值
    Func1(1);//仅仅传第一个给a，剩下的b和c用缺省值
    Func1(1, 2);//传a和b，c用缺省值
    Func1(1, 2, 3);//三个都传，那么三个都不用缺省值
    //Func1(,2,);//这样写是错的，因为我们这么写不支持，因为我们传参要连续传参
 
    Func2(100);
    Func2(100, 200);
    Func2(100, 200, 300);
    return 0;
}
// 全缺省   缺省全部参数
void Func1(int a, int b, int c )
{
    cout << "a = " << a << endl;
    cout << "b = " << b << endl;
    cout << "c = " << c << endl << endl;
}
// 半缺省  缺省部分参数
void Func2(int a, int b , int c)
{
    cout << "a = " << a << endl;
    cout << "b = " << b << endl;
    cout << "c = " << c << endl << endl;
}

/*
a = 10
b = 20
c = 30
 
a = 1
b = 20
c = 30
 
a = 1
b = 2
c = 30
 
a = 1
b = 2
c = 3
 
a = 100
b = 10
c = 20
 
a = 100
b = 200
c = 20
 
a = 100
b = 200
c = 300
 
*/